<?php
//---------------------------------------------------------------------------------------------------------------------------
   $translation_query_main =
         " SELECT ".
         "   lang.name AS lang_name, ".
         "   lang.sys_name AS lang_sys_name, ".
         "   lang.id AS lang_id, ".
         "   const.id AS const_id, ".
         "   const.resource, ".
         "   const.name AS const_name, ".
         "   lab.`text` AS label_text, ".
         "   lab_en.`text` as label_en, ".
         "   lab.id AS label_id ".
         " FROM fa_language lang ".
         "   CROSS JOIN fa_const  const".
         "   LEFT OUTER JOIN fa_label lab ON (lang.id = lab.language_id AND lab.const_id = const.id)  ".
         "   LEFT OUTER JOIN fa_label lab_en ON (lab_en.const_id = const.id AND ".
                                                    " lab_en.language_id IN ( ".
                                                        " SELECT distinct tl.id ".
                                                        " FROM fa_language tl ".
                                                        " WHERE tl.sys_name='en' ".
                                                        " ) ".
                                                    " ) ";
   $translation_query_count =
         " SELECT count(*)".
         " FROM fa_language lang ".
         "   CROSS JOIN fa_const const ".
         "   LEFT OUTER JOIN fa_label lab ON (lang.id = lab.language_id AND lab.const_id = const.id)  ";

//---------------------------------------------------------------------------------------------------------------------------
?>
